home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / Macintosh Tracker 1.1 Source / Tracker Client Folder / CMyDocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-01  |  6.7 KB  |  224 lines  |  [TEXT/KAHL]

  1. /* CMyDocument.h */
  2.  
  3. #pragma once
  4.  
  5. #include "CDocument.h"
  6. #include <Aliases.h>
  7. #include <Processes.h>
  8. #include <AppleEvents.h>
  9.  
  10. class CWindow;
  11. class CArray;
  12. class CSongList;
  13. class CPicture;
  14. class CStaticText;
  15. class CCheckbox;
  16. class CNumberEdit;
  17.  
  18. class CStopButton;
  19. class CRewindButton;
  20. class CFastForwardButton;
  21. class CSkipToNextButton;
  22. class CStaticText;
  23. class CAutoNextSong;
  24. class CRepeat;
  25. class CRandomize;
  26. class CAutoStartSongs;
  27. class CDefaultStereoOn;
  28. class CDefaultAntiAliasing;
  29. class CDefaultSamplingRate;
  30. class CDefaultStereoMix;
  31. class CDefaultNumRepeats;
  32. class CDefaultSpeed;
  33. class CDefaultVolume;
  34. class CSpecificStereoOn;
  35. class CSpecificAntiAliasing;
  36. class CSpecificSamplingRate;
  37. class CSpecificStereoMix;
  38. class CSpecificNumRepeats;
  39. class CSpecificSpeed;
  40. class CSpecificVolume;
  41. class CSpecificTracker;
  42. class COverrideStereoOn;
  43. class COverrideAntiAliasing;
  44. class COverrideSamplingRate;
  45. class COverrideStereoMix;
  46. class COverrideNumRepeats;
  47. class COverrideSpeed;
  48. class COverrideVolume;
  49. class CNumOutputBits;
  50.  
  51. #define SongNameLength (32)
  52.  
  53. typedef struct
  54.     {
  55.         MyBoolean                SamplingRateOverrideDefault;
  56.         ushort                    SamplingRate;
  57.         MyBoolean                StereoOnOverrideDefault;
  58.         MyBoolean                StereoOn;
  59.         MyBoolean                StereoMixOverrideDefault;
  60.         short                        StereoMix;
  61.         MyBoolean                AntiAliasingOverrideDefault;
  62.         MyBoolean                AntiAliasing;
  63.         MyBoolean                SpeedOverrideDefault;
  64.         short                        Speed;
  65.         MyBoolean                NumRepeatsOverrideDefault;
  66.         short                        NumRepeats;
  67.         MyBoolean                VolumeOverrideDefault;
  68.         short                        Volume;
  69.         MyBoolean                Tracker; /* False = ours, True = Frank's */
  70.         AliasRecord**        SongLocation;
  71.         uchar                        SongName[SongNameLength];
  72.  
  73.         MyBoolean                PlayedFlag;  /* for randomize */
  74.     } SongRec;
  75.  
  76. /* possible player states */
  77. enum    {PlayerLaunching, PlayerWaitingForInit, PlayerRunning, PlayerDying};
  78.  
  79. struct    CMyDocument    :    CDocument
  80.     {
  81.         CWindow*                                RootWindow;
  82.         FSSpec                                    TheFile;
  83.         MyBoolean                                EverSaved;
  84.         MyBoolean                                UpToDate;
  85.         CArray*                                    ListOfSongs;
  86.         MyBoolean                                FileOpenFlag;
  87.         short                                        FileRef;
  88.  
  89.         ushort                                    SamplingRate;
  90.         MyBoolean                                StereoOn;
  91.         short                                        StereoMix;
  92.         MyBoolean                                AntiAliasing;
  93.         short                                        Speed;
  94.         short                                        NumRepeats;
  95.         short                                        Volume;
  96.         MyBoolean                                AutoNextSong;
  97.         MyBoolean                                Repeat;
  98.         MyBoolean                                AutoStartSongs;
  99.         MyBoolean                                Randomize;
  100.         MyBoolean                                UseSixteenBitMode;
  101.  
  102.         long                                        Selection;
  103.  
  104.         CSongList*                            SongList;
  105.         CPicture*                                PausePlayButton;
  106.         CStopButton*                        StopButton;
  107.         CRewindButton*                    RewindButton;
  108.         CFastForwardButton*            FastForwardButton;
  109.         CSkipToNextButton*            SkipToNextButton;
  110.         CAutoNextSong*                    AutoNextSongBox;
  111.         CRepeat*                                RepeatBox;
  112.         CAutoStartSongs*                AutoStartSongsBox;
  113.         CRandomize*                            RandomizeBox;
  114.         CDefaultStereoOn*                DefaultStereoOnBox;
  115.         CDefaultAntiAliasing*        DefaultAntiAliasingBox;
  116.         CDefaultSamplingRate*        DefaultSamplingRateBox;
  117.         CDefaultStereoMix*            DefaultStereoMixBox;
  118.         CDefaultNumRepeats*            DefaultNumRepeatsBox;
  119.         CDefaultSpeed*                    DefaultSpeedBox;
  120.         CDefaultVolume*                    DefaultVolumeBox;
  121.         CSpecificStereoOn*            SpecificStereoOnBox;
  122.         CSpecificAntiAliasing*    SpecificAntiAliasingBox;
  123.         CSpecificSamplingRate*    SpecificSamplingRateBox;
  124.         CSpecificStereoMix*            SpecificStereoMixBox;
  125.         CSpecificNumRepeats*        SpecificNumRepeatsBox;
  126.         CSpecificSpeed*                    SpecificSpeedBox;
  127.         CSpecificVolume*                SpecificVolumeBox;
  128.         CSpecificTracker*                SpecificTrackerBox;
  129.         CStaticText*                        SpecificSamplingRateText;
  130.         CStaticText*                        SpecificStereoMixText;
  131.         CStaticText*                        SpecificNumRepeatsText;
  132.         CStaticText*                        SpecificSpeedText;
  133.         CStaticText*                        SpecificVolumeText;
  134.         COverrideStereoOn*            OverrideStereoOnBox;
  135.         COverrideAntiAliasing*    OverrideAntiAliasingBox;
  136.         COverrideSamplingRate*    OverrideSamplingRateBox;
  137.         COverrideStereoMix*            OverrideStereoMixBox;
  138.         COverrideNumRepeats*        OverrideNumRepeatsBox;
  139.         COverrideSpeed*                    OverrideSpeedBox;
  140.         COverrideVolume*                OverrideVolumeBox;
  141.         CNumOutputBits*                    NumOutputBitsBox;
  142.  
  143.         MyBoolean                                PlayNextWhenThisOneStops;
  144.         long                                        SongToStart;
  145.         MyBoolean                                PlayerExists;
  146.         short                                        PlayerState;
  147.         long                                        Playing; /* index of song being played */
  148.         ProcessSerialNumber            OurPlayer;
  149.  
  150.  
  151.         /* */                CMyDocument();
  152.         /* */                ~CMyDocument();
  153.         void                DoNewFile(void);
  154.         MyBoolean        GoAway(void);
  155.         void                DoPrint(void);
  156.         void                DoOpenFile(FSSpec* TheSpec);
  157.         MyBoolean        SaveFile(void);
  158.         MyBoolean        SaveFileAs(void);
  159.         void                WriteData(void);
  160.         void                AddSong(FSSpec* TheSpec);
  161.         void                CancelCurrentSong(void);
  162.         void                StartThisSong(long SongIndex);
  163.         void                RemoveSongFromList(long SongIndex);
  164.         void                MakeNewWindow(void);
  165.         void                DoIdle(long Stupid);
  166.         void                SetNewSelection(long NewSelection);
  167.         void                MoveSong(long SongIndex, long NewIndex);
  168.  
  169.         void                SetStereoOn(MyBoolean NewStereoOn);
  170.         void                SetAntiAliasing(MyBoolean NewAntiAliasing);
  171.         void                SetSamplingRate(ulong NewSamplingRate);
  172.         void                SetStereoMix(short NewStereoMix);
  173.         void                SetNumRepeats(short NewNumRepeats);
  174.         void                SetSpeed(short NewSpeed);
  175.         void                SetVolume(short NewVolume);
  176.         void                SetSpecificTracker(MyBoolean UseFrankSeide);
  177.         void                SetOverrideStereoOn(MyBoolean Flag);
  178.         void                SetOverrideAntiAliasing(MyBoolean Flag);
  179.         void                SetOverrideSamplingRate(MyBoolean Flag);
  180.         void                SetOverrideStereoMix(MyBoolean Flag);
  181.         void                SetOverrideNumRepeats(MyBoolean Flag);
  182.         void                SetOverrideSpeed(MyBoolean Flag);
  183.         void                SetOverrideVolume(MyBoolean Flag);
  184.         void                SetDefaultStereoOn(MyBoolean NewStereoOn);
  185.         void                SetDefaultAntiAliasing(MyBoolean NewAntiAliasing);
  186.         void                SetDefaultSamplingRate(ulong NewSamplingRate);
  187.         void                SetDefaultStereoMix(short NewStereoMix);
  188.         void                SetDefaultNumRepeats(short NewNumRepeats);
  189.         void                SetDefaultSpeed(short NewSpeed);
  190.         void                SetDefaultVolume(short NewVolume);
  191.         void                SetNumOutputBits(MyBoolean SixteenBitMode);
  192.  
  193.         void                SetAutoNextSong(MyBoolean NewAutoNextSong);
  194.         void                SetRepeat(MyBoolean NewRepeat);
  195.         void                SetAutoStartSongs(MyBoolean NewAutoStartSongs);
  196.         void                SetRandomize(MyBoolean NewRandomize);
  197.         void                ResetRandomPlayList(void);
  198.         void                StartRandomSong(void);
  199.  
  200.         void                SendMessage(short TheMessage, DescType TheKeyWord);
  201.  
  202.         void                DoRewind(MyBoolean Flag);
  203.         void                DoStop(void);
  204.         void                DoPlay(void);
  205.         void                DoPause(void);
  206.         void                DoFastForward(MyBoolean Flag);
  207.         void                DoSkipToNext(void);
  208.         void                DoVolumeUp(void);
  209.         void                DoVolumeDown(void);
  210.  
  211.         void                PlayerDiedNotification(void);
  212.         void                PlayerLaunchedNotification(ProcessSerialNumber TheProcNum);
  213.     };
  214.  
  215.  
  216. /* menu options */
  217. #define mDeleteSelection (0x1000)
  218. #define mPlaySelection (0x1001)
  219. #define mStopPlaying (0x1002)
  220. #define mIncreaseVolume (0x1003)
  221. #define mDecreaseVolume (0x1004)
  222. #define mShowSelection (0x1005)
  223. #define mShowPlaying (0x1006)
  224.